
package com.be.beadmin.quality.repository;

import com.be.beadmin.quality.entity.InspectionTask;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

/**
* @author zjm
* @date 2023-05-28
**/
public interface InspectionTaskRepository extends JpaRepository<InspectionTask, String>, JpaSpecificationExecutor<InspectionTask> {

    InspectionTask findInspectionTaskByIdAndDelete(String id, Integer delete);

    List<InspectionTask> findInspectionTaskByWoAndTemplateNameLikeAndDelete(String wo,String templateName, Integer delete);

    List<InspectionTask> findInspectionTaskByWoAndTypeAndDelete(String wo,String type, Integer delete);

    List<InspectionTask> findInspectionTasksByProcessIdAndDelete(String processId, Integer delete);

//    List<InspectionTask> findInspectionTasksByBat(String processId, Integer delete);


    List<InspectionTask> findInspectionTasksByProcessIdAndStateAndDelete(String processId,Integer state, Integer delete);
    InspectionTask findInspectionTaskById(String id);

    InspectionTask findInspectionTaskByProductQualityIdAndDelete(String productQualityId,  Integer delete);
}